<?php
namespace app\model;

use think\Model;

class Campaign extends Model
{
	protected $table = 'cfg_campaign';

	public static function getList ($array, $userId) {
		$where = [];
		array_push($where, ['companyId', '=', $array['companyId']]);
		array_push($where, ['userId', '=', $userId]);
		$query = self::field('userId as uid, campaignId as id, campaignName as name')->where($where)->select()->toArray();
		return $query;
	}
	
}